package com.notary.cms.web.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.notary.cms.common.entity.Page;
import com.notary.cms.common.entity.Query;
import com.notary.cms.common.entity.R;
import com.notary.cms.common.utils.CommonUtils;
import com.notary.cms.web.entity.GoodsOrderContact;
import com.notary.cms.web.manager.GoodsOrderContactManager;
import com.notary.cms.web.service.GoodsOrderContactService;

@Component("goodsOrderContactService")
public class GoodsOrderContactServiceImpl implements GoodsOrderContactService {
	
	@Autowired
	GoodsOrderContactManager   goodsOrderContactManager;

	@Override
	public Page<GoodsOrderContact> listGoodsOrderContactForPage(
			Map<String, Object> params) {
		
		Query form = new Query(params);
		
	    Page<GoodsOrderContact> page = new Page<GoodsOrderContact>(form);
	    
	    goodsOrderContactManager.listGoodsOrderContactForPage(page, form);
	    
		return page;
	}

	@Override
	public R updateByPrimaryKeySelective(GoodsOrderContact record) {
		// TODO Auto-generated method stub
		
		int count = goodsOrderContactManager.updateByPrimaryKeySelective(record);
		
		return CommonUtils.msg(count);
	}

	@Override
	public R selectByPrimaryKey(Long recId) {
		// TODO Auto-generated method stub
		GoodsOrderContact goodsOrderContact = goodsOrderContactManager.selectByPrimaryKey(recId);
		
		return CommonUtils.msg(goodsOrderContact);
	}

}
